<include file="Common/works/header" />
<include file="Common/works/left_menu" />
<link href="__PUBLIC__/home/css/bootstrap.min.css" rel="stylesheet" />
<link href="__PUBLIC__/home/css/webuploader.css" rel="stylesheet" />
<link href="__PUBLIC__/home/css/uploads_pic/cropper.min.css" rel="stylesheet" />
<link href="__PUBLIC__/home/css/uploads_pic/main.css" rel="stylesheet" />
<!--<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/smiditor/styles/font-awesome.css" />-->
<!--<link rel="stylesheet" type="text/css" href="__PUBLIC__/home/smiditor/styles/simditor.css" />-->
<link rel="stylesheet" href="__PUBLIC__/home/css/wangEditor.min.css" />
<div class="right" method="post" id="tab1" name="tab1">
	<div class="faservice_title">
		<a href="fuwu.html" title="我的服务">我的报告</a>&nbsp;&gt;&nbsp;新建报告</div>
	<div class="faservice presentation">
		<!--报告名称-->
		<div class="column">
			<div class="field">报告名称:</div>
			<input id="_report_title" name="service_name" class="kt1 fl" placeholder="请填写中文名称，用于交易市场显示" value="{$info.title}" />
			<div id="_errDiv_title" class="error hide">
				<i></i><span id="report_title_msg">请输入报告名称</span>
			</div>
		</div>
		<!--报告简介-->
		<div class="column">
			<div class="field">报告简介:</div>
			<textarea name="report_desc" id="_report_desc" class="textarea fl" maxlength="200" placeholder="请填写服务介绍，长度不超过50个字" />{$info.desc}</textarea>
			<div id="_errDiv_desc" class="error hide">
				<i></i><span id="report_desc_msg">请输入报告简介</span>
			</div>
		</div>

		<!--图片-->
		<div class="column">
			<div class="field">产品图片:</div>
			<div class="fl">
				<div id="crop-avatar">
					<!-- Current avatar -->
					<div class="avatar-view" title="图片上传">
						<img src="{$info.cover_img}" class="fl" alt="Avatar" />
						<input type="hidden" value="{$info.cover_img}" class="_service_logo" id='_report_cover_img_id' />
					</div>
					<!-- Cropping modal -->
					<div class="modal fade" id="avatar-modal" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog" tabindex="-1">
						<div class="modal-dialog modal-lg">
							<div class="modal-content">
								<form class="avatar-form" action="/common/imageUpload.html" enctype="multipart/form-data" method="post">
									<div class="modal-header">
										<button class="close" data-dismiss="modal" type="button">&times;</button>
										<h4 class="modal-title" id="avatar-modal-label">产品图片上传</h4>
									</div>
									<div class="modal-body">
										<div class="avatar-body">
											<!-- Upload image and data -->
											<div class="avatar-upload">
												<input class="avatar-src" name="avatar_src" type="hidden" />
												<input class="avatar-data" name="avatar_data" type="hidden" />
												<label for="avatarInput">图片选择</label>
												<input class="avatar-input" id="avatarInput" name="avatar_file" type="file" />
												<div class="avatar-upload-tip"></div>
											</div>
											<!-- Crop and preview -->
											<div class="row">
												<div class="col-sm-8">
													<div class="avatar-wrapper"></div>
												</div>
												<div class="col-sm-4 center-block">
													<div style="padding:0 15px;">

														<div class="avatar-preview preview-lg container padding-0" title="图片上传">
															<img src="__PUBLIC__/home/images/scan.jpg" />
														</div>
														<div class="avatar-preview preview-md container padding-0" title="图片上传">
															<img src="__PUBLIC__/home/images/scan.jpg" />
														</div>

														<div class="avatar-btns">
															<div class="col-md-11 container">
																<button class="btn btn-primary btn-block avatar-save _imgOver" type="submit">完成</button>
															</div>
														</div>
													</div>
												</div>
											</div>

										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
					<!-- /.modal -->
					<!-- Loading state -->
					<div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>
				</div>
				<div class="upload">图片大小160*220px，不超过500k，格式仅支持jpg，png</div>
			</div>
			<div class="error hide" id="_errDiv_cover_img">
				<i></i><span id="file_upload_msg">请上传产品图片</span>
			</div>
		</div>
		<!--上传文件-->
		<div class="column">
			<div class="field">选择文件:</div>
			<a href="javascript:void(0)" class="cobed" id='_pushFile' title="上传文件">上传文件</a>
			<div class="commentaryt _pushMsg">{$info.attachment_name}</div>
			<div id="_errDiv_attachment" class="error hide">
				<i></i><span id="service_name_msg">请上传报告</span>
			</div>
			<input type="hidden" class='_pushFileAddress' id="_report_attachment" value="{$info.attachment}" />
			<div class="cls"></div>
		</div>

		<!--详细介绍-->
		<!--<div class="column">
			<div class="field">详细介绍:</div>
			<div>
				<textarea id="editor" placeholder="这里输入内容" autofocus>{$info.content}</textarea>
			</div>
			<div id="_content" style="display:none;">{$info.content|htmlspecialchars_decode|stripslashes}</div>
			<div id="_errDiv_content" class="error hide">
				<i></i><span id="report_content_msg">请输入报告详细介绍</span>
			</div>
		</div>-->
		<style type="text/css">
			.wangEditor-container p {
				color: #000 !important
			}
		</style>
		<div class="column">
			<div class="field">详细介绍:</div>
			<div id="editor-container" class="container">
				<div id="editor-trigger">{$info.content|html_entity_decode|htmlspecialchars_decode|stripslashes}</div>
			</div>
			<div id="_errDiv_content" class="error hide">
				<i></i><span id="report_content_msg">请输入报告详细介绍</span>
			</div>
		</div>
		<!--相关数据-->
		<div class="column">
			<div class="field">相关数据:</div>
			<a href="javascript:void(0);" class="cobed" title="选择数据" id="_chooseData">选择数据</a>
			<ul class="relation _relatedData">
				<?php $related_id_array = explode(",",$info['related_service_ids']);?>
				<foreach name="related_list" item="list">
					<if condition="in_array($list['service_id'],$related_id_array) eq true">
						<li class="_checkValue{$list.service_id}" idNum={$list.service_id}>{$list.service_name}</li>
					</if>

				</foreach>
			</ul>
			<input type="hidden" id="related_service_ids" value={$info.related_service_ids} />
		</div>

		<!--价格-->
		<div class="column price">
			<div class="fieldt fl">收费类型:</div>

			<div class="classification">
				<input name='report_price' id="_free" class="xz" type="radio" value="0" <if condition="$info['price'] eq 0">checked="checked"</if> /> 免费
			</div>
			<div class="classification">
				<input name='report_price' id="_charge" class="xz" type="radio" value="1" <if condition="$info['price'] gt 0">checked="checked"</if> /> 自定义价格&nbsp;&nbsp;&nbsp;&nbsp;¥
			</div>
			<input class="kt9 fl _report_Money" placeholder="价格" maxlength="10" <if condition="$info['price'] gt 0">value="{$info['price']}"
			<else />disabled="disabled"</if>/>
			<div id="_errDiv_price" class="error hide">
				<i></i><span id="_report_price_msg">请输入商品单价</span>
			</div>
			<div class="cls"></div>
		</div>

		<!--确定发布-->
		<div class="column">
			<input type="button" class="confirm _editReportbtn" autocomplete="on" maxlength="50" value="确定" />
			<div class="cls"></div>
		</div>
	</div>
</div>
</div>

<!--相关数据弹窗-->
<div id="relatedData" class="mydiv presentation">
	<div class="hz">
		<div class="hztop">最多选择5个数据
			<a href="javascript:void(0)" title="关闭窗口" class="close_btn _chooseClose"><img src="__PUBLIC__/home/images/no.png"></a>
		</div>
		<div class="hzcp">
			<foreach name="related_list" item="related_info">
				<p>
					<input name="relatedDataCharge" class="xz" type="checkbox" value="{$related_info.service_id}">{$related_info.service_name}
				</p>
			</foreach>
		</div>
		<div class="mydiv-foot">
			<a class="sm _chooseSure">确定</a>
		</div>
	</div>
</div>
<input type="hidden" value="{$info.id}" class="_report_info_id"  />
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/home/js/jquery.1.11.min.js"></script>
<script src="__PUBLIC__/home/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/home/js/uploads_pic/cropper.min.js"></script>
<script src="__PUBLIC__/home/js/uploads_pic/main-report.js"></script>
<script src='__PUBLIC__/home/js/webuploader.min.js'></script>
<script src="__PUBLIC__/home/js/wangEditor.min.js"></script>
<script src="__PUBLIC__/home/js/addReport.js"></script>
</body>

</html>